<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link href="/assets/css/text.css" rel="stylesheet" type="text/css">
    <link href="/assets/css/main.css" rel="stylesheet" type="text/css">
    <link href="/assets/css/content.css" rel="stylesheet" type="text/css">
    <script language="javascript" src="/assets/js/common.js"></script>
    <script language="javascript" src="/assets/js/general.js"></script>
    <script language="JavaScript" type="text/JavaScript">
    </script>
    <style>
        #title {
            width: 92%;
            border: 0px;
            margin-bottom: 10px;
        }

        #title td {
            text-align: center;
            height: 20px;
            line-height: 150%
        }

        #title div {
            background-image: url(/assets/img/dot_02.gif);
            background-position: left top;
            background-repeat: no-repeat;
            margin: 0 auto;
            padding-left: 20px;
            text-align: left;
            width: 10%;
            font-size: 15px;
            font-weight: bold;
            color: #CC0000;
            letter-spacing: 2px;
        }

        a{
            color: black;
        }
    </style>
    <script>
        function add() {
            window.location.href=("/list/custom/CustomAdd.jsp");
        }
    </script>
</head>
<body>
<table cellspacing="0" cellpadding="0" id="title" align="center">
    <tbody>
    <tr>
        <td nowrap="nowrap">
            <div>客户管理</div>
        </td>
    </tr>
    </tbody>
</table>

<table cellpadding="0" cellspacing="0" class="datalist" align="center">
    <tbody>
    <tr>
        <td colspan="10" align="right"><input type="button" value="添加" onclick="add()"/></td>
    </tr>
    <tr>
        <th height="25" align="center" >客户编号</th>
        <th align="center" >客户名称</th>
        <th align="center" >客户地址</th>
        <th align="center" >固定电话</th>
        <th align="center" >手机</th>
        <th align="center" >邮箱</th>
        <th align="center" >联系人</th>
        <th align="center" >国家</th>
        <th align="center" >状态</th>
        <th align="center"  colspan="2">操作</th>
    </tr>

    <c:forEach items="${cust}" var="c">
        <tr>
            <td height="25" align="center">${c.c_id}</td>
            <td align="center"><a href="/list/custom/CustomDetail.jsp?c_id=${c.c_id}">${c.c_name}</a></td>
            <td align="center">${c.c_addr}</td>
            <td align="center">${c.c_tel}</td>
            <td align="center">${c.c_phone}</td>
            <td align="center">${c.c_email}</td>
            <td align="center">${c.c_contact}</td>
            <td align="center">${c.c_country}</td>
            <td align="center">
                    <c:if test=" ${c.c_status==1}">
                        正在交易
                    </c:if>
                    <c:if test=" ${c.c_status==2}">
                        潜在
                    </c:if>
                    <c:if test=" ${c.c_status==3}">
                        联系中
                    </c:if>
                    <c:if test=" ${c.c_status==4}">
                        已报价
                    </c:if>


            </td>
            <td align="center"><a href="/delcustom.do?c_id=${c.c_id}"><img src="/assets/img/icodelete.gif"></a></td>
        </tr>
    </c:forEach>

    <tr>
        <td colspan="1"></td>
        <td colspan="4"><a href="/servlet/DownloadServlet?fileName=custom.xls&fileUUid=92B0CF1CF73447A19FFFBE49D32DD75C&filetype=8">批量导入模板下载</a></td>
        <td colspan="4">批量导入客户资料：<input type="file" value=""/> <input type="submit" value="导入"/></td>
        <td><input type="button" value="导出xls"/></td>
    </tr>
    </tbody>
</table>
</body>
</html>